package com.gdhz.xiaohengqin.device.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import java.time.LocalDateTime;

/**
 * @author Swallows
 * @date 2025-06-04 10:44
 */
@Getter
@Setter
@NoArgsConstructor
@Table("access_record")
public class AccessRecord {

    @Id
    private Integer id;

    @JsonProperty("SN")
    private Integer sn;

    @JsonProperty("索引位")
    private Integer index;

    @JsonProperty("记录类型")
    private Integer recordType;

    @JsonProperty("卡号")
    private Long cardNo;

    @JsonProperty("门号")
    private Integer doorNo;

    @JsonProperty("进出")
    private String inout;

    @JsonProperty("有效")
    private String status;

    @JsonProperty("描述")
    private String description;

    @JsonProperty("时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime dateTime;
}
